package com.feng.zhihao.apigeteway.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * InterfaceCaseInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "INTERFACE_CASE_INFO")

public class InterfaceCaseInfo implements java.io.Serializable {

	// Fields

	private String interfaceCaseId;
	private InterfaceFieldInfo interfaceFieldInfo;
	private InterfaceInfo interfaceInfo;
	private String interfaceCaseExplain;
	private String interfaceFieldValue;
	private Set<ChannelInterfaceCase> channelInterfaceCases = new HashSet<ChannelInterfaceCase>(0);

	// Constructors

	/** default constructor */
	public InterfaceCaseInfo() {
	}

	/** minimal constructor */
	public InterfaceCaseInfo(String interfaceCaseId) {
		this.interfaceCaseId = interfaceCaseId;
	}

	/** full constructor */
	public InterfaceCaseInfo(String interfaceCaseId, InterfaceFieldInfo interfaceFieldInfo, InterfaceInfo interfaceInfo,
			String interfaceCaseExplain, String interfaceFieldValue, Set<ChannelInterfaceCase> channelInterfaceCases) {
		this.interfaceCaseId = interfaceCaseId;
		this.interfaceFieldInfo = interfaceFieldInfo;
		this.interfaceInfo = interfaceInfo;
		this.interfaceCaseExplain = interfaceCaseExplain;
		this.interfaceFieldValue = interfaceFieldValue;
		this.channelInterfaceCases = channelInterfaceCases;
	}

	// Property accessors
	@Id

	@Column(name = "INTERFACE_CASE_ID", unique = true, nullable = false, length = 36)

	public String getInterfaceCaseId() {
		return this.interfaceCaseId;
	}

	public void setInterfaceCaseId(String interfaceCaseId) {
		this.interfaceCaseId = interfaceCaseId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "INTERFACE_FIELD_ID")

	public InterfaceFieldInfo getInterfaceFieldInfo() {
		return this.interfaceFieldInfo;
	}

	public void setInterfaceFieldInfo(InterfaceFieldInfo interfaceFieldInfo) {
		this.interfaceFieldInfo = interfaceFieldInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "INTERFACE_ID")

	public InterfaceInfo getInterfaceInfo() {
		return this.interfaceInfo;
	}

	public void setInterfaceInfo(InterfaceInfo interfaceInfo) {
		this.interfaceInfo = interfaceInfo;
	}

	@Column(name = "INTERFACE_CASE_EXPLAIN", length = 4096)

	public String getInterfaceCaseExplain() {
		return this.interfaceCaseExplain;
	}

	public void setInterfaceCaseExplain(String interfaceCaseExplain) {
		this.interfaceCaseExplain = interfaceCaseExplain;
	}

	@Column(name = "INTERFACE_FIELD_VALUE", length = 1024)

	public String getInterfaceFieldValue() {
		return this.interfaceFieldValue;
	}

	public void setInterfaceFieldValue(String interfaceFieldValue) {
		this.interfaceFieldValue = interfaceFieldValue;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "interfaceCaseInfo")

	public Set<ChannelInterfaceCase> getChannelInterfaceCases() {
		return this.channelInterfaceCases;
	}

	public void setChannelInterfaceCases(Set<ChannelInterfaceCase> channelInterfaceCases) {
		this.channelInterfaceCases = channelInterfaceCases;
	}

}